/* 通用样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

/* 页面主体样式 */
body {
    background-color: #f5f5f5;
    color: #333;
    padding: 20px;
}
/* 顶部导航条 */
.navigate {
    position: fixed;/* 固定定位 */
    top: 0;
    left: 0;
    width: 100%;
    /* background-color: #2c3e50; */
    background-color: #417dff;
    padding: 1em 2em;
    display: flex;
    justify-content: space-between;/* 两端对齐 */
    align-items: center;
    box-shadow: 0 0.25em 0.375em rgba(0, 0, 0, 0.1);/* 阴影效果 */
    z-index: 1000;
    height: 2.5em;
}

.navigate .logo {
    color: white;
    font-size: 1em;
    font-weight: 600;
}

.navigate .operation .operation_bar tr {
    display: flex;
    gap: 1.5em;/* 子元素间距 */
}

.navigate .operation .operation_bar td a {
    color: white;
    text-decoration: none;
    font-size: 1em;
    transition: color 0.3s ease;
}

.navigate .operation .operation_bar td a:hover {
    color: #1abc9c;
}

/* 用户资料显示区域 */
#user-profile {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

#user-avatar {
    width: 1.5em;
    height: 1.5em;
    border-radius: 50%;
    object-fit: cover;/* 图片填充方式 */
}

#username {
    color: white;
    font-size: 0.875em;
	transition: color 0.3s ease;
}
/* 用户名悬停效果 */
#username:hover{
	color: #1abc9c;
}

/* 主容器样式 */
.container {
    max-width: 800px;
    margin: 2em auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

/* 标题样式 */
h1 {
    text-align: center;
    color: #3498db;
    margin-bottom: 30px;
    font-size: 2.2em;
}

/* 选项卡样式 */
/* .tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    margin-right: 5px;
}

.tab.active {
    background-color: #e74c3c;
    color: white;
    border-color: #e74c3c;
} */

/* 排行榜表格样式 */
.leaderboard {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard th {
    background-color: #417dff;
    color: white;
    padding: 12px;
    text-align: left;
}

.leaderboard td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.leaderboard tr:nth-child(even) {
    background-color: #f9f9f9;
}

.leaderboard tr:hover {
    background-color: #f1f1f1;
}

/* 排名列样式 */
.rank {
    font-weight: bold;
    color: #e74c3c;
    width: 50px;
}

/* 用户信息样式 */
/* 确保头像显示为圆形 */
.leaderboard .user .avatar {
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 50%; /* 圆形 */
    overflow: hidden; /* 确保内容不会超出圆形边界 */
    vertical-align: middle;
    margin-right: 10px;
    background-color: #f0f0f0; /* 默认背景色 */
}

.leaderboard .user .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 确保图片填充整个圆形区域 */
}

/* 如果没有头像时的默认样式 */
.leaderboard .user .avatar:not(:has(img)) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    background-color: #3498db; /* 默认蓝色背景 */
}

/* 分数样式 */
.score {
    font-weight: bold;
    text-align: right;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: bold;
    /* margin-left: 10px; */
}

.gold {
    background-color: gold;
    color: white;
}

.silver {
    background-color: silver;
    color: white;
}

.bronze {
    background-color: #cd7f32;
    color: white;
}

/* 时间样式 */
.time {
    color: #777;
    font-size: 0.9em;
}

/* 刷新按钮样式 */
.refresh-btn {
    display: block;
    margin: 20px auto 0;
    padding: 10px 20px;
    background-color: #417dff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}

.refresh-btn:hover {
    background-color: #3498db;
}

/* 分页控件样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.page-btn {
    padding: 8px 12px;
    margin: 0 5px;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
}

.page-btn.active {
    background-color: #417dff;
    color: white;
    border-color: #3498db;
}